Database Mirroring

Note: Also see High Availability Clustering, which offers a superior means of redundancy.

Patriot's database mirroring feature provides a very low latency 'warm' backup solution for businesses who demand the shortest possible monitoring down-time, and the most minimal signal loss in the rare event of a critical server fault. Database mirroring works by sending all transactions (received signals, activation status changes, client file updates, report settings, etc.) on the primary (principal) server in real-time - as they happen - to a preconfigured Patriot backup (mirror) server. This system keeps the two databases synchronised to within a fraction of a second, this is a marked reduction on Patriot's standard minimum automated backup time-delay of thirty seconds. With database mirroring enabled backup server testing is simplified; the server currently acting in the 'mirror' role can be promoted to the 'principle' in a matter of seconds (Note: actual down-time between primary and backup server monitoring will be longer and vary across systems as it it highly dependent on the alarm receiver/panel/camera hardware installed).

Prerequisites

See also

Setup

On the backup server, ensure that the Patriot services are not running, and then start the Patriot Utilities program from the Windows start menu.

Navigate to the Mirroring setup tool: Maintenance → Database →Mirroring Setup and enter your Microsoft SQL and Patriot server details before clicking the arrow button to proceed. The SQL server details can refer to either the primary or backup instance, but the Patriot server details must be for the primary Patriot Server. The Patriot Host Port No. can be found by opening the connection settings panel from any Patriot client login screen.

Mirroring Setup Panel

The second stage of the Mirroring Setup tool requires the names (or IP addresses) of the primary and backup MS SQL servers to be entered. The primary server must be set to the machine hosting the SQL server instance to which the primary Patriot server is connected. The backup SQL server may or may not have a Patriot database installed. When all form fields have been completed click the enable button to begin mirroringand a pop-up window will appear, prompting for a new primary server backup to taken, and restored for mirroring on the backup server.

Enable database mirroring

If "No" is selected at the prompt the mirror database restore tool will open. This tools requires up-to-date backup files from the primary server - see this document for information on creating a backup of Patriot's databases. The paths to the main and archive database backup .dat files must be entered into the appropriate fields on the form. Note that transaction log (.log) files must be saved in the same Windows directory as the .dat backup files in order for Patriot to detect them. Close the Restore Mirror Databases tool when the restore process completes.

RestoreMirrorDatabase

Finally, to complete the database mirroring setup process, return to the Mirroring Setup tool and select "Yes."

Mirroring Monitor Task

Patriot includes a Mirroring Monitor task to help you monitor the mirroring status of the core Patriot database. This task will generate alarm events if, for example, the backup (mirror) MS SQL instance was to drop offline. It is strongly recommended that this task is setup immediately after enabling databases mirroring.

Managing the Mirrored Patriot database connection

The Patriot database mirror connection is controlled with the Patriot Configurator program which can be found through the Windows start menu on a Patriot primary or backup server. The mirroring control tools are located beneath the Data and Task service tools. On the left side of the window, text is displayed indicating the current state of the mirroring connection (note that this indicator is not updated automatically, the "refresh" button at far right must be used to get up-to-date information). The "play" button is used to control the connection and has two functions depending on the current state of the connection:

Patriot Configurator Pre-Manual Failover

Manual Failover button is enabled when in the "Principle Syncronized state".

Patriot Configurator pre-mirror promotion

Promote to Pinciple button is enabled when in the "Mirror Disconnected" state.

Disable a Patriot Database Mirroring session

A Patriot database mirroring session can be de-activated with the same Mirroring Setup tool provided by the Patriot Utilities program and explained in the Setup section of this document. The de-activate button to the right of the activate button will be operational if any Patriot database mirroring connection is detected. This button should be used to disable the mirroring session - a safety confirmation window will ask for confirmation before the session is disabled. Once disabled, Patriot databases on both servers will enter an active state and neither will be automatically updated to reflect changes in the other.

Screenshot of the Patriot Utilities program Mirroring Setup tool when in the active state ready for de-activation.

Troubleshooting

"An error occurred while activating Database Mirroring..."

If a message like the above is returned after pressing the "Activate" button: